	/* 动态生成轮播图数据 */
	function dynamicRotation() {
		var addressIp = "http://1.14.68.137:8000/";
		var data = null
		var bigImg = $(".lbt_salat");
		$.get(addressIp + "index_images/", function (x) {
			data = x.data;
			console.log(data)
			data.some((item, index) => {
				var imgNode = $("<div class='salat_img'><img src=''></div>");
				imgNode.children().eq(0).attr("src", item.url);
				bigImg.append(imgNode);
			})
		})
	}
	dynamicRotation();
	function RotationChart(lbt, longBox, xdd, clickLeft, clickRight, times) {
		$(longBox).children().each(function (i, ele) {
			if (xdd) {
				$(xdd).append($("<span></span>"));
			}
		});
		if (xdd) {
			$(xdd).children().eq(0).css({opacity:1});
		}
		$(longBox).append($(longBox).children().eq(0).clone(true));
		$(longBox).prepend($(longBox).children().eq($(longBox).children().length - 2).clone(true));
		$(longBox).css({
			width: 100 * $(longBox).children().length + "%"
		});
		var index = 0;
		var items = setInterval(function () {
			$(clickRight).trigger("click");
		}, times);
		$(clickRight).click(function () {
			index++;
			if ($(longBox).children().length - 2 == index) {
				$(longBox).stop().animate({
					left: -index * $(lbt).width()
				}, 300, function () {
					$(longBox).stop().animate({
						left:0
					}, 0);
				});
				index = 0;
			}else {
				$(longBox).stop().animate({
					left: -index * $(lbt).width()
				}, 300);
			};
			xddList();
		})
		$(clickLeft).click(function () {
			index--;
			if (index < 0) {
				index = $(longBox).children().length - 2;
				$(longBox).stop().animate({
					left: -index * $(lbt).width()
				}, 0, function () {
					index--;
					$(longBox).stop().animate({
						left: -index * $(lbt).width()
					}, 300);
				});
			}else {
				$(longBox).stop().animate({
					left: -index * $(lbt).width()
				}, 300);
			};
			xddList();
		})
		$(lbt).mouseover(function () {
			clearInterval(items);
			items = "";
		});
		$(lbt).mouseout(function () {
			items = setInterval(function () {
				$(clickRight).trigger("click");
			}, times);
		});
		function xddList() {
			if (xdd) {
				$(xdd).children().css({opacity:.5});
				$(xdd).children().eq(index).css({opacity:1});
			}else {
				return
			}
		}
	}
	setTimeout(function () {
		RotationChart(".lbt", ".lbt_salat", ".xdd", ".lbt_left_dd", ".lbt_right_dd", 3000);
	}, 100)
	RotationChart(".md_wb_tp", ".small_lb_tp", "", ".left_dd_tp", ".right_dd_tp", 2000)
	RotationChart(".md_wb_bt", ".small_lb_bt", "", ".left_dd_bt", ".right_dd_bt", 1800)
	
	tabs(".md_tp>span", ".txt_img_tp>div");
	tabs(".md_bt>span", ".txt_img_bt>div");
	
	function tabs(clickNode, fadeNode) {
		$(fadeNode).eq(0).show();
		$(clickNode).click(function () {
			$(fadeNode).eq($(this).index()).stop().fadeIn().siblings().stop().fadeOut()
		});
	}
	
	$("#sgin").click(function () {
		location.href = "./sign_in.html";
	})
	

	$(".modity_nav>a").click(function () {
		$(this).addClass("on").siblings().removeClass("on");
	})
	
	
	
	
	$("#returnTop")